home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Coord / c / PtInRect < prev    next >
Text File  |  1995-07-09  |  1KB  |  31 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Coord.PtInRect.c
  12.     Author:  Copyright © 1992 Edouard Poor
  13.     Version: 1.01 (13 Jul 1993)
  14.     Purpose: Check if a point lies within a rectangle
  15. */
  16.  
  17.  
  18. #include "DeskLib:Core.h"
  19. #include "DeskLib:Wimp.h"
  20. #include "DeskLib:Coord.h"
  21.  
  22.  
  23. BOOL Coord_PointInRect(wimp_coord *point, wimp_rect *rectangle)
  24.     {
  25.     if(point->x < rectangle->min.x) return(FALSE);
  26.     if(point->x > rectangle->max.x) return(FALSE);
  27.     if(point->y < rectangle->min.y) return(FALSE);
  28.     if(point->y > rectangle->max.y) return(FALSE);
  29.     return(TRUE);
  30.     }
  31.